﻿#pragma once

#include <QDialog>
#include "SettingsExport.h"

namespace Ui {
class SettingsDialog;
}

namespace Domy {

class EditorSettingsWidget;
class GeneralSettingsWidget;

/**
 * @brief The SettingsDialog class
 * @note  设置窗口
 */
class SETTINGS_EXPORT SettingsDialog : public QDialog
{
    Q_OBJECT

public:
    explicit SettingsDialog(QWidget *parent = nullptr);
    ~SettingsDialog();

signals:
    void signalUpdateSettings();

private slots:
    void slotOnSettingsChanged();
    void slotOnOKBtnClicked();
    void slotOnApplyBtnClicked();
    void slotOnRestoreDefault();

private:
    void applySettings();
    void restoreSettings();

private:
    Ui::SettingsDialog    *m_ui;

    EditorSettingsWidget  *m_editor_settings;

    GeneralSettingsWidget *m_general_settings;
};

} // namespace Domy
